package spring.service;

import spring.component.MyAutowired;
import spring.component.MyComponent;
import spring.component.Myname;
import spring.entity.PrototypeUser;
import spring.entity.SingletonUser;

/**
 * User  yyl
 * Description: mySpring
 * Created by yaoyonglong on 2018/11/1 10:14
 */

@MyComponent(scope = "singleton")
@Myname(name = "myservice")
public class Myservice {

    @MyAutowired()
    private SingletonUser singletonUser11;

    @MyAutowired()
    private PrototypeUser prototypeUser11;

    public String Sell() {
//        System.out.println("已经注入成功了");
//        System.out.println(singletonUser11.toString());
//        System.out.println(prototypeUser11.toString());
        return prototypeUser11.toString();
    }
}
